package edu.neu.ecommerceplatform.mapper;

import edu.neu.ecommerceplatform.model.Product;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import edu.neu.ecommerceplatform.dto.CategorySalesDto;

@Mapper
public interface ProductMapper {
    List<Product> findAll();
    Product findById(Integer id);
    List<Product> findByName(String name);
    int insert(Product product);
    int update(Product product);
    int deleteById(Integer id);
    List<Product> findByCategoryId(Integer id);
    List<CategorySalesDto> findSalesByLeafCategory();
}